package com.zhny.vo;

import java.util.Map;

/**
 * @Author 侯俊杰
 * @Date 2017/11/29
 * @Time 22:21
 **/
public class LogItem
{
    private Map<String,String> logMap;

    public LogItem(Map<String, String> logMap)
    {
        this.logMap = logMap;
    }

    public Map<String, String> getLogMap()
    {
        return logMap;
    }

    public void setLogMap(Map<String, String> logMap)
    {
        this.logMap = logMap;
    }

    public String detail()
    {
        StringBuilder sb = new StringBuilder();
        sb.append("数据包类型="+logMap.get("数据包类型")+"\n");
        sb.append("创建时间="+logMap.get("创建时间")+"\n");
        sb.append("设备标识符="+logMap.get("设备标识符")+"\n");
        sb.append("设备类型="+logMap.get("设备类型")+"\n");
        sb.append("数据="+logMap.get("数据")+"\n");
        return sb.toString();
    }

    @Override
    public String toString()
    {
        return logMap.get("创建时间")+"   "+logMap.get("数据包类型")+"   "+logMap.get("设备标识符")+"   "+logMap.get("设备类型")+"   "+"数据长"+logMap.get("数据长度");
    }
}
